#include "app_config.h"

#if APP_SELECT_EXAMPLE == 2

#include "polsys.h"

#define LED         AP_GPIO->ODR_f.ODR7
#define TURN_EN     AP_GPIO->IDR_f.IDR21

static polsys_task_t mTimer;

static void mTimerHdl();


// 启动事件，程序启动时执行一次
void App_Load()
{
    Gpio_Init();    // GPIO初始参数见 cst92f25_lydrv_config.h
    Polsys_TaskInit(&mTimer,mTimerHdl,500);
}


static void mTimerHdl()
{
    if(TURN_EN)LED = ~LED;
    LOG("DIR:0x%08X\r\n",AP_GPIO->DIR);
    LOG("ODR:0x%08X\r\n",AP_GPIO->ODR);
    LOG("IDR:0x%08X\r\n",AP_GPIO->IDR);
}





#endif
